//
// Created by 成飞 on 2024/1/3.
//
#include "command_line.h"
#include "command_parser.hpp"

using namespace std;

void start_CLI(){
    string prompt = "orderkv> ";
    cout << "Welcome to the orderkvDB Shell!" << endl;

    while (true) {
        cout << prompt;
        string userInput;
        getline(cin, userInput);
        if (userInput == "quit") {
            exit_CLI();
            break; // 退出shell
        } else {
            CommandParser().parse_input(userInput);
        }
    }
}

void exit_CLI(){
    cout << "Good Bye!" << endl;
}